<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<script type="text/javascript">
function sosanh(){
	var boxa = document.frm.boxa.value;
	var boxb = document.frm.boxb.value;
	if(boxa.length<boxb.length)
		document.frm.ketqua[2].checked = true;
	else if(boxa.length==boxb.length)
		document.frm.ketqua[1].checked = true;
	else
		document.frm.ketqua[0].checked = true;
}
</script>

</head>

<body>

<form name="frm">
    <table border="0" align="center">
        <tr>
            <td>Box A</td>
            <td><input type="text" name="boxa"/></td>
        </tr>
        <tr>
            <td>Box B</td>
            <td><input type="text" name="boxb"/></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><input type="button" value="So Sanh" onclick="sosanh()"/></td>
        </tr>
        <tr>
            <td colspan="2">
            	<input type="radio" name="ketqua" /> Box A 
                <input type="radio" name="ketqua" /> Bang Nhau
                <input type="radio" name="ketqua" /> Box B 
            </td>
            
            <h3>Da Sua Xong</h3>
           </tr>
    </table>
</form>

</body>
</html>
